home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / include / plevent.h < prev    next >
C/C++ Source or Header  |  1993-01-23  |  7KB  |  208 lines

  1. /* $Id: plevent.h,v 1.1 1993/01/23 05:36:01 mjl Exp $
  2.    $Log: plevent.h,v $
  3.  * Revision 1.1  1993/01/23  05:36:01  mjl
  4.  * This file added for inclusion by all user-defined event handlers to be
  5.  * used with plplot.  It contains constant definitions used to transmit
  6.  * info on the event that occurred (e.g. keystroke definitions).
  7.  *
  8. */
  9.  
  10. /*
  11.     plevent.h
  12.  
  13.     Input event (especially keyboard) definitions for use from plplot
  14.     event handlers.
  15.  
  16.     Key definitions are taken from the X11/keysymdef.h include file,
  17.     with only the control keys retained, and the "XK" prefix changed
  18.     to "PLK".  Users that wish to can handle the X keysym directly.
  19.  
  20.     This file can be included on all systems, whether X-based or not.
  21.     Drivers for non-X systems must translate the raw keycodes to those
  22.     used here, so not all keyboard input may be available.
  23. */
  24.  
  25. #ifndef __PLEVENT_H__
  26. #define __PLEVENT_H__
  27.  
  28. /* Key definitions */
  29.  
  30. /***********************************************************
  31. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  32. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  33.  
  34.                         All Rights Reserved
  35.  
  36. Permission to use, copy, modify, and distribute this software and its
  37. documentation for any purpose and without fee is hereby granted,
  38. provided that the above copyright notice appear in all copies and that
  39. both that copyright notice and this permission notice appear in
  40. supporting documentation, and that the names of Digital or MIT not be
  41. used in advertising or publicity pertaining to distribution of the
  42. software without specific, written prior permission.
  43.  
  44. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  45. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  46. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  47. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  48. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  49. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  50. SOFTWARE.
  51.  
  52. ******************************************************************/
  53.  
  54. #define PLK_BackSpace        0xFF08    /* back space, back char */
  55. #define PLK_Tab            0xFF09
  56. #define PLK_Linefeed        0xFF0A    /* Linefeed, LF */
  57. #define PLK_Clear        0xFF0B
  58. #define PLK_Return        0xFF0D    /* Return, enter */
  59. #define PLK_Pause        0xFF13    /* Pause, hold */
  60. #define PLK_Scroll_Lock        0xFF14
  61. #define PLK_Escape        0xFF1B
  62. #define PLK_Delete        0xFFFF    /* Delete, rubout */
  63.  
  64. /* Cursor control & motion */
  65.  
  66. #define PLK_Home        0xFF50
  67. #define PLK_Left        0xFF51    /* Move left, left arrow */
  68. #define PLK_Up            0xFF52    /* Move up, up arrow */
  69. #define PLK_Right        0xFF53    /* Move right, right arrow */
  70. #define PLK_Down        0xFF54    /* Move down, down arrow */
  71. #define PLK_Prior        0xFF55    /* Prior, previous (Page Up) */
  72. #define PLK_Next        0xFF56    /* Next (Page Down) */
  73. #define PLK_End            0xFF57    /* EOL */
  74. #define PLK_Begin        0xFF58    /* BOL */
  75.  
  76. /* Misc Functions */
  77.  
  78. #define PLK_Select        0xFF60    /* Select, mark */
  79. #define PLK_Print        0xFF61
  80. #define PLK_Execute        0xFF62    /* Execute, run, do */
  81. #define PLK_Insert        0xFF63    /* Insert, insert here */
  82. #define PLK_Undo        0xFF65    /* Undo, oops */
  83. #define PLK_Redo        0xFF66    /* redo, again */
  84. #define PLK_Menu        0xFF67
  85. #define PLK_Find        0xFF68    /* Find, search */
  86. #define PLK_Cancel        0xFF69    /* Cancel, stop, abort, exit */
  87. #define PLK_Help        0xFF6A    /* Help, ? */
  88. #define PLK_Break        0xFF6B
  89. #define PLK_Mode_switch        0xFF7E    /* Character set switch */
  90. #define PLK_script_switch    0xFF7E  /* Alias for mode_switch */
  91. #define PLK_Num_Lock        0xFF7F
  92.  
  93. /* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
  94.  
  95. #define PLK_KP_Space        0xFF80    /* space */
  96. #define PLK_KP_Tab        0xFF89
  97. #define PLK_KP_Enter        0xFF8D    /* enter */
  98. #define PLK_KP_F1        0xFF91    /* PF1, KP_A, ... */
  99. #define PLK_KP_F2        0xFF92
  100. #define PLK_KP_F3        0xFF93
  101. #define PLK_KP_F4        0xFF94
  102. #define PLK_KP_Equal        0xFFBD    /* equals */
  103. #define PLK_KP_Multiply        0xFFAA
  104. #define PLK_KP_Add        0xFFAB
  105. #define PLK_KP_Separator    0xFFAC    /* separator, often comma */
  106. #define PLK_KP_Subtract        0xFFAD
  107. #define PLK_KP_Decimal        0xFFAE
  108. #define PLK_KP_Divide        0xFFAF
  109.  
  110. #define PLK_KP_0        0xFFB0
  111. #define PLK_KP_1        0xFFB1
  112. #define PLK_KP_2        0xFFB2
  113. #define PLK_KP_3        0xFFB3
  114. #define PLK_KP_4        0xFFB4
  115. #define PLK_KP_5        0xFFB5
  116. #define PLK_KP_6        0xFFB6
  117. #define PLK_KP_7        0xFFB7
  118. #define PLK_KP_8        0xFFB8
  119. #define PLK_KP_9        0xFFB9
  120.  
  121. /*
  122.  * Auxilliary Functions; note the duplicate definitions for left and right
  123.  * function keys;  Sun keyboards and a few other manufactures have such
  124.  * function key groups on the left and/or right sides of the keyboard.
  125.  * We've not found a keyboard with more than 35 function keys total.
  126.  */
  127.  
  128. #define PLK_F1            0xFFBE
  129. #define PLK_F2            0xFFBF
  130. #define PLK_F3            0xFFC0
  131. #define PLK_F4            0xFFC1
  132. #define PLK_F5            0xFFC2
  133. #define PLK_F6            0xFFC3
  134. #define PLK_F7            0xFFC4
  135. #define PLK_F8            0xFFC5
  136. #define PLK_F9            0xFFC6
  137. #define PLK_F10            0xFFC7
  138. #define PLK_F11            0xFFC8
  139. #define PLK_L1            0xFFC8
  140. #define PLK_F12            0xFFC9
  141. #define PLK_L2            0xFFC9
  142. #define PLK_F13            0xFFCA
  143. #define PLK_L3            0xFFCA
  144. #define PLK_F14            0xFFCB
  145. #define PLK_L4            0xFFCB
  146. #define PLK_F15            0xFFCC
  147. #define PLK_L5            0xFFCC
  148. #define PLK_F16            0xFFCD
  149. #define PLK_L6            0xFFCD
  150. #define PLK_F17            0xFFCE
  151. #define PLK_L7            0xFFCE
  152. #define PLK_F18            0xFFCF
  153. #define PLK_L8            0xFFCF
  154. #define PLK_F19            0xFFD0
  155. #define PLK_L9            0xFFD0
  156. #define PLK_F20            0xFFD1
  157. #define PLK_L10            0xFFD1
  158. #define PLK_F21            0xFFD2
  159. #define PLK_R1            0xFFD2
  160. #define PLK_F22            0xFFD3
  161. #define PLK_R2            0xFFD3
  162. #define PLK_F23            0xFFD4
  163. #define PLK_R3            0xFFD4
  164. #define PLK_F24            0xFFD5
  165. #define PLK_R4            0xFFD5
  166. #define PLK_F25            0xFFD6
  167. #define PLK_R5            0xFFD6
  168. #define PLK_F26            0xFFD7
  169. #define PLK_R6            0xFFD7
  170. #define PLK_F27            0xFFD8
  171. #define PLK_R7            0xFFD8
  172. #define PLK_F28            0xFFD9
  173. #define PLK_R8            0xFFD9
  174. #define PLK_F29            0xFFDA
  175. #define PLK_R9            0xFFDA
  176. #define PLK_F30            0xFFDB
  177. #define PLK_R10            0xFFDB
  178. #define PLK_F31            0xFFDC
  179. #define PLK_R11            0xFFDC
  180. #define PLK_F32            0xFFDD
  181. #define PLK_R12            0xFFDD
  182. #define PLK_R13            0xFFDE
  183. #define PLK_F33            0xFFDE
  184. #define PLK_F34            0xFFDF
  185. #define PLK_R14            0xFFDF
  186. #define PLK_F35            0xFFE0
  187. #define PLK_R15            0xFFE0
  188.  
  189. /* Modifiers */
  190.  
  191. #define PLK_Shift_L        0xFFE1    /* Left shift */
  192. #define PLK_Shift_R        0xFFE2    /* Right shift */
  193. #define PLK_Control_L        0xFFE3    /* Left control */
  194. #define PLK_Control_R        0xFFE4    /* Right control */
  195. #define PLK_Caps_Lock        0xFFE5    /* Caps lock */
  196. #define PLK_Shift_Lock        0xFFE6    /* Shift lock */
  197.  
  198. #define PLK_Meta_L        0xFFE7    /* Left meta */
  199. #define PLK_Meta_R        0xFFE8    /* Right meta */
  200. #define PLK_Alt_L        0xFFE9    /* Left alt */
  201. #define PLK_Alt_R        0xFFEA    /* Right alt */
  202. #define PLK_Super_L        0xFFEB    /* Left super */
  203. #define PLK_Super_R        0xFFEC    /* Right super */
  204. #define PLK_Hyper_L        0xFFED    /* Left hyper */
  205. #define PLK_Hyper_R        0xFFEE    /* Right hyper */
  206.  
  207. #endif    /* __PLEVENT_H__ */
  208.